﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ArticleList.aspx.cs" Inherits="Hxsoft.AppV1.Admin.ArticleManage.ArticleList" %>

<%@ Register Src="~/Controls/ListBox_FootBox.ascx" TagName="ListBox_FootBox" TagPrefix="uc" %>
<%@ Register Src="~/Controls/ListBox_HeadBox.ascx" TagName="ListBox_HeadBox" TagPrefix="uc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>文章管理</title>

    <script type="text/javascript" src="<%# ResolveUrl("~/J/List.js") %>"></script>

    <script language="javascript" type="text/javascript">
	<!--
        function ReloadPage() {
            var btReload = document.getElementById("<%# BtReload.ClientID %>");
            if (btReload)
                btReload.click();
        }      
        
        function <%# this.ClientID %>_Init() {
			$('a.ShowContent').cluetip({sticky: true, width:720, attribute:'href', showTitle:false, closePosition: 'top', closeText:'关闭', mouseOutClose:false, dropShadow:false, arrows: true,activation:'click'});
		}   
	
	-->
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="MainBody" runat="server">
        当前位置: 管理中心 → 文章管理
        <uc:ListBox_HeadBox ID="ListBox_HeadBox1" runat="server" />
        <div class="ListBoxItem">
            <table id="ToolBarBox" cellspacing="0" width="100%">
                <tr>
                    <td class="LevelCompart" align="right">
                        <input type="button" class="Button" value="全选" onclick="SelectAllInner(&quot;List&quot;, &quot;&quot;);" />
                        <input type="button" class="Button" value="反选" onclick="SelectReverseInner(&quot;List&quot;, &quot;&quot;);" />
                        |
                        <input type="submit" id="BtSetOpenComment" value="设置评论状态" runat="server" class="Button"
                            onclick="return confirm(&quot;是否设置选定的信息的评论状态？&quot;);" onserverclick="BtSetOpenComment_ServerClick" />
                        <input type="submit" id="BtSetEffectiveState" value="设置有效状态" runat="server" class="Button"
                            onclick="return confirm(&quot;是否设置选定的信息的有效状态？&quot;);" onserverclick="BtSetEffectiveState_ServerClick" />
                        <input type="submit" id="BtDelete" value="删除" runat="server" class="Button" onserverclick="BtDelete_ServerClick"
                            onclick="return confirm(&quot;是否删除选定的信息？&quot;);" />
                        <input class="Button" onclick="javascript:OpenWindowCenter(&quot;AddArticle.aspx?SiteId=<%= SiteId %>&quot;);"
                            type="button" value="添加" />
                    </td>
                </tr>
                <tr>
                    <td id="Foot">
                        ID:<asp:TextBox ID="TbID" runat="server"></asp:TextBox>
                        关键字:<asp:TextBox ID="TbKeyword" runat="server"></asp:TextBox>
                        有效:<asp:DropDownList ID="DdlIsEffective" runat="server">
                            <asp:ListItem Value="">-请选择-</asp:ListItem>
                            <asp:ListItem Value="true">是</asp:ListItem>
                            <asp:ListItem Value="false">否</asp:ListItem>
                        </asp:DropDownList>
                        <br />
                        用户名:<asp:TextBox ID="TbUserName" runat="server"></asp:TextBox>
                        添加时间: 从<Hxctr:JSCalendarTextBox ID="JtbStartRegisterDate" runat="server"></Hxctr:JSCalendarTextBox>
                        至<Hxctr:JSCalendarTextBox ID="JtbEndRegisterDate" runat="server"></Hxctr:JSCalendarTextBox>
                        <asp:Button ID="BtSearch" runat="server" Text="搜索" OnClick="BtSearch_Click" />
                        |
                        <asp:Button ID="BtReload" runat="server" Text="刷新" OnClick="BtReload_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="ListBoxItem">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <table id="ListBox" cellspacing="0" width="100%">
                        <tbody>
                            <tr>
                                <td class="LevelCompart">
                                    <asp:Repeater ID="List" runat="server" OnItemCommand="List_ItemCommand">
                                        <HeaderTemplate>
                                            <table id="List" cellspacing="1" cellpadding="2" width="100%">
                                                <tr id="Title">
                                                    <th width="40">
                                                        [ID]
                                                    </th>
                                                    <th>
                                                        标题
                                                    </th>
                                                    <th width="50" >
                                                        发布者
                                                    </th>
                                                    <th width="120">
                                                        发布时间
                                                    </th>
                                                    <th width="40">
                                                        有效
                                                    </th>
                                                    <th width="50">
                                                        评论状态
                                                    </th>
                                                    <th width="60">
                                                        操作
                                                    </th>
                                                    <th width="40">
                                                        选择
                                                    </th>
                                                </tr>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <tr class="mouseout" align="center" onmouseover="listItem_mouseOver(this);" onmouseout="listItem_mouseOut(this);">
                                                <td>
                                                    <%# Eval("ArticleID") %>
                                                </td>
                                                <td align="left">
                                                    [<a class="ShowContent" href="Controls/ShowArticleContent.aspx?InfoId=<%# Eval("ArticleID") %>">显</a>]
                                                    <%# Eval("Title") %>
                                                </td>
                                                <td>
                                                    <%# ItemCreateName %>
                                                </td>
                                                <td>
                                                    <%# Eval("ReleaseDate") %>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="LbtSetEffectiveState" CommandName="SetEffectiveState" OnClientClick="return confirm(&quot;是否更改该信息的有效状态？&quot;);"
                                                        runat="server"><%# (bool)Eval("IsEffective") == true ? "是" : "<span class=\"Emphasize\">否</span>"%></asp:LinkButton>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="LbtSetOpenComment" CommandName="SetOpenComment" OnClientClick="return confirm(&quot;是否更改该信息的评论状态？&quot;);"
                                                        runat="server"><%# GetCommentState(Convert.ToInt32(Eval("ArticleID"))) %></asp:LinkButton>
                                                </td>
                                                <td>
                                                    <a href="javascript:void(0);" onclick='javascript:OpenWindowCenter("ModifyArticle.aspx?ArticleID=<%# Eval("ArticleID") %>&SiteId=<%# SiteId %>");'>
                                                        修改</a>
                                                    <asp:LinkButton ID="LbtDelete" CommandName="Delete" OnClientClick="return confirm(&quot;是否删除该信息？&quot;);"
                                                        runat="server">删除</asp:LinkButton>
                                                </td>
                                                <td>
                                                    <asp:CheckBox ID="CbSelect" runat="server" />
                                                    <asp:HiddenField ID="Identifier_ArticleID" Value='<%# Eval("ArticleID") %>' runat="server" />
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            </table>
                                        </FooterTemplate>
                                    </asp:Repeater>
                                </td>
                            </tr>
                            <tr>
                                <td id="Td1" align="right">
                                    <Hxctr:AspNetPager ID="pager" runat="server" AlwaysShow="True" OnPageChanging="pager_PageChanging"
                                        CustomInfoSectionWidth="" CustomInfoText="" PageSize="20" ShowCustomInfoSection="Left">
                                    </Hxctr:AspNetPager>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="BtDelete" EventName="ServerClick" />
                    <asp:AsyncPostBackTrigger ControlID="BtReload" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="BtSearch" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="BtSetEffectiveState" EventName="ServerClick" />
                    <asp:AsyncPostBackTrigger ControlID="BtSetOpenComment" EventName="ServerClick" />
                </Triggers>
            </asp:UpdatePanel>
        </div>
        <uc:ListBox_FootBox ID="ListBox_FootBox1" runat="server" />
    </div>
    <Hxctr:MessageBox ID="MessageBox1" runat="server" />
    <Hxctr:UpdateProgress ID="UpdateProgress1" runat="server" />
    </form>
</body>
</html>
